class Solution {
public:
    bool CheckPermutation(string s1, string s2) {
        if (s1.size() != s2.size())
            return false;
        int arr[26];
        for (auto c : s1)
            arr[c - 'a']++;
        for (auto c : s2)
        {
            arr[c - 'a']--;
            if (arr[c - 'a'] < 0)
                return false;
        }
        return true;
    }
};